/*     */ package eos.moe.dragoncore;
/*     */ 
/*     */ import net.minecraft.client.Minecraft;
/*     */ import net.minecraft.client.gui.FontRenderer;
/*     */ import net.minecraft.client.gui.Gui;
/*     */ import net.minecraft.client.gui.GuiButton;
/*     */ import net.minecraft.nbt.NBTBase;
/*     */ import net.minecraft.nbt.NBTTagByte;
/*     */ import net.minecraft.nbt.NBTTagByteArray;
/*     */ import net.minecraft.nbt.NBTTagDouble;
/*     */ import net.minecraft.nbt.NBTTagFloat;
/*     */ import net.minecraft.nbt.NBTTagInt;
/*     */ import net.minecraft.nbt.NBTTagIntArray;
/*     */ import net.minecraft.nbt.NBTTagLong;
/*     */ import net.minecraft.nbt.NBTTagShort;
/*     */ import net.minecraft.nbt.NBTTagString;
/*     */ import net.minecraft.util.ResourceLocation;
/*     */ import org.lwjgl.opengl.GL11;
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ public class gu
/*     */   extends Gui
/*     */ {
/*  29 */   public static final ResourceLocation k = new ResourceLocation("nbtedit", "textures/gui/window.png");
/*     */   
/*     */   public static final int o = 178;
/*     */   public static final int y = 93;
/*  33 */   private Minecraft h = Minecraft.func_71410_x();
/*     */   
/*     */   private yo<oy> u;
/*     */   
/*     */   private NBTBase j;
/*     */   
/*     */   private boolean c;
/*     */   
/*     */   private boolean r;
/*     */   
/*     */   private cq f;
/*     */   
/*     */   private int s;
/*     */   
/*     */   private int m;
/*     */   
/*     */   public gu(cq cq1, yo<oy> yo1, boolean bool1, boolean bool2) {
/*  50 */     this.f = cq1;
/*  51 */     this.u = yo1;
/*  52 */     this.j = ((oy)yo1.v()).v();
/*  53 */     this.c = bool1;
/*  54 */     this.r = bool2;
/*     */   }
/*     */   private sr l; private sr t; private GuiButton d; private GuiButton z; private String i; private String w; private aw q; private aw g;
/*     */   public void initGUI(int i, int j) {
/*  58 */     this.s = i;
/*  59 */     this.m = j;
/*     */     
/*  61 */     this.g = new aw((byte)0, i + 178 - 1, j + 34);
/*  62 */     this.q = new aw((byte)1, i + 178 - 1, j + 50);
/*  63 */     String str1 = (this.l == null) ? ((oy)this.u.v()).v() : this.l.getText();
/*  64 */     String str2 = (this.t == null) ? v(this.j) : this.t.getText();
/*  65 */     this.l = new sr(this.h.field_71466_p, i + 46, j + 18, 116, 15, false);
/*  66 */     this.t = new sr(this.h.field_71466_p, i + 46, j + 44, 116, 15, true);
/*     */     
/*  68 */     this.l.setText(str1);
/*  69 */     this.l.setEnableBackgroundDrawing(false);
/*  70 */     this.l.func_82265_c(this.c);
/*  71 */     this.t.setMaxStringLength(2147483647);
/*  72 */     this.t.setText(str2);
/*  73 */     this.t.setEnableBackgroundDrawing(false);
/*  74 */     this.t.func_82265_c(this.r);
/*  75 */     this.d = new GuiButton(1, i + 9, j + 62, 75, 20, "Save");
/*  76 */     if (!this.l.isFocused() && !this.t.isFocused())
/*  77 */       if (this.c) {
/*  78 */         this.l.setFocused(true);
/*  79 */       } else if (this.r) {
/*  80 */         this.t.setFocused(true);
/*     */       }  
/*  82 */     this.g.setEnabled(this.t.isFocused());
/*  83 */     this.q.setEnabled(this.t.isFocused());
/*  84 */     this.z = new GuiButton(0, i + 93, j + 62, 75, 20, "Cancel");
/*     */   }
/*     */   
/*     */   public void click(int i, int j) {
/*  88 */     if (this.q.inBounds(i, j) && this.t.isFocused()) {
/*  89 */       this.t.writeText("\n");
/*  90 */       v();
/*  91 */     } else if (this.g.inBounds(i, j) && this.t.isFocused()) {
/*  92 */       this.t.writeText("§");
/*  93 */       v();
/*     */     } else {
/*  95 */       this.l.mouseClicked(i, j, 0);
/*  96 */       this.t.mouseClicked(i, j, 0);
/*  97 */       if (this.d.func_146116_c(this.h, i, j))
/*  98 */         z(); 
/*  99 */       if (this.z.func_146116_c(this.h, i, j))
/* 100 */         this.f.closeWindow(); 
/* 101 */       this.g.setEnabled(this.t.isFocused());
/* 102 */       this.q.setEnabled(this.t.isFocused());
/*     */     } 
/*     */   }
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   
/*     */   public void draw(int i, int j) {
/* 116 */     this.h.field_71446_o.func_110577_a(k);
/*     */     
/* 118 */     GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
/* 119 */     func_73729_b(this.s, this.m, 0, 0, 178, 93);
/* 120 */     if (!this.c)
/* 121 */       func_73734_a(this.s + 42, this.m + 15, this.s + 169, this.m + 31, -2147483648); 
/* 122 */     if (!this.r)
/* 123 */       func_73734_a(this.s + 42, this.m + 41, this.s + 169, this.m + 57, -2147483648); 
/* 124 */     this.l.drawTextBox();
/* 125 */     this.t.drawTextBox();
/*     */     
/* 127 */     this.d.func_191745_a(this.h, i, j, 0.0F);
/* 128 */     this.z.func_191745_a(this.h, i, j, 0.0F);
/*     */     
/* 130 */     if (this.i != null)
/* 131 */       func_73732_a(this.h.field_71466_p, this.i, this.s + 89, this.m + 4, 16711680); 
/* 132 */     if (this.w != null) {
/* 133 */       func_73732_a(this.h.field_71466_p, this.w, this.s + 89, this.m + 32, 16711680);
/*     */     }
/* 135 */     this.q.draw(i, j);
/* 136 */     this.g.draw(i, j);
/*     */   }
/*     */   
/*     */   public void func_73732_a(FontRenderer fontRenderer, String str, int i, int j, int k) {
/* 140 */     fontRenderer.func_78276_b(str, i - fontRenderer.func_78256_a(str) / 2, j, k);
/*     */   }
/*     */   
/*     */   public void update() {
/* 144 */     this.t.updateCursorCounter();
/* 145 */     this.l.updateCursorCounter();
/*     */   }
/*     */   
/*     */   public void keyTyped(char c, int i) {
/* 149 */     if (i == 1) {
/* 150 */       this.f.closeWindow();
/* 151 */     } else if (i == 15) {
/* 152 */       if (this.l.isFocused() && this.r) {
/* 153 */         this.l.setFocused(false);
/* 154 */         this.t.setFocused(true);
/* 155 */       } else if (this.t.isFocused() && this.c) {
/* 156 */         this.l.setFocused(true);
/* 157 */         this.t.setFocused(false);
/*     */       } 
/* 159 */       this.g.setEnabled(this.t.isFocused());
/* 160 */       this.q.setEnabled(this.t.isFocused());
/* 161 */     } else if (i == 28) {
/* 162 */       v();
/* 163 */       if (this.d.field_146124_l)
/* 164 */         z(); 
/*     */     } else {
/* 166 */       this.l.textboxKeyTyped(c, i);
/* 167 */       this.t.textboxKeyTyped(c, i);
/* 168 */       v();
/*     */     } 
/*     */   }
/*     */ }


/* Location:              D:\fanbian\[D][龙之核心]DragonCore-2.6.0.3.jar!\eos\moe\dragoncore\gu.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */